Class java.rmi.server.LogStream
All Packages Class Hierarchy This Package Previous Next Index
Class java.rmi.server.LogStream
Object
|
+----OutputStream
|
+----FilterOutputStream
|
+----PrintStream
|
+----java.rmi.server.LogStream
- public class LogStream
- extends PrintStream
LogStream
presents a mechanism for logging errors that are
of possible interest to those monitoring the system.
- Author:
- Ann Wollrath (lots of code stolen from Ken Arnold)
-
BRIEF
-
-
SILENT
- constants for logging levels
-
VERBOSE
-
-
getDefaultStream()
- Return the current default stream for new logs.
-
getOutputStream()
- Return the current stream to which output from this log is sent.
-
log(String)
- Return the LogStream identified by the given name.
-
parseLevel(String)
- Convert a string name of a logging level to its internal
integer representation.
-
setDefaultStream(PrintStream)
- Set the default stream for new logs.
-
setOutputStream(OutputStream)
- Set the stream to which output from this log is sent.
-
toString()
- Return log name as string representation
-
write(int)
- Write a byte of data to the stream.
-
write(byte[], int, int)
- Write a subarray of bytes.
BRIEF
public static final int BRIEF
SILENT
public static final int SILENT
- constants for logging levels
VERBOSE
public static final int VERBOSE
getDefaultStream
public static synchronized java.io.PrintStream getDefaultStream()
- Return the current default stream for new logs.
getOutputStream
public synchronized java.io.OutputStream getOutputStream()
- Return the current stream to which output from this log is sent.
log
public static java.rmi.server.LogStream log(String name)
- Return the LogStream identified by the given name. If
a log corresponding to "name" does not exist, a log using
the default stream is created.
parseLevel
public static int parseLevel(String s)
- Convert a string name of a logging level to its internal
integer representation.
setDefaultStream
public static synchronized void setDefaultStream(PrintStream newDefault)
- Set the default stream for new logs.
setOutputStream
public synchronized void setOutputStream(OutputStream out)
- Set the stream to which output from this log is sent.
toString
public java.lang.String toString()
- Return log name as string representation
- Overrides:
- toString in class Object
write
public void write(int b)
- Write a byte of data to the stream. If it is not a newline, then
the byte is appended to the internal buffer. If it is a newline,
then the currently buffered line is sent to the log's output
stream, prefixed with the appropriate logging information.
- Overrides:
- write in class PrintStream
write
public void write(byte b,
int off,
int len)
- Write a subarray of bytes. Pass each through write byte method.
- Overrides:
- write in class PrintStream
All Packages Class Hierarchy This Package Previous Next Index